import {get, post} from './axios'


// 获取订单列表
async  function waitPayment(data) {
    const url = `/admin/order/list`
    return await get(url, data)
}

// 获取订单详情
async  function orderDetail(data) {
    const url = `/admin/order/find`
    return await get(url, data)
}

// 关闭订单
async  function closeOrder(data) {
    const url = `/admin/order/close`
    return await post(url, data)
}

// 订单核销
async  function verifyOrder(data) {
    const url = `/admin/order/verify`
    return await post(url, data)
}

// 后台拒绝退款
async  function refuseRefund(data) {
    const url = `/admin/order/refuseRefund`
    return await post(url, data)
}

// 后台同意退款
async  function agree(data) {
    const url = `/admin/order/refund`
    return await post(url, data)
}

// 订单转换(已付款->待核销)
async  function orderChange(data) {
    const url = `/admin/order/change`
    return await post(url, data)
}

export {
    waitPayment,
    orderDetail,
    closeOrder,
    verifyOrder,
    refuseRefund,
    agree,
    orderChange
}
